home *** CD-ROM | disk | FTP | other *** search
- ; Interrupt code and function codes for IBM PC DOS 2.0
- ; These are described in detail in Appendix D of the DOS Manual.
- ; [20-Jan-84] Nelson H.F. Beebe
-
- $STDIN EQU 00H ; Standard input file handle (redirectable)
- $STDOUT EQU 01H ; Standard output file handle (redirectable)
- $STDERR EQU 02H ; Standard error file handle (NOT redirectable)
- $STDAUX EQU 03H ; Standard auxiliary device handle
- $STDPRT EQU 04H ; Standard printer device handle
-
- $VIDEO EQU 10H ; Video input/output
-
- $VIDEO_SETMODE EQU 00H ; Set mode from AL
- $VIDEO_SETCURSORTYPE EQU 01H ; Set cursor type from CX
- $VIDEO_SETCURSORPOSITION EQU 02H ; Set cursor position
- ; from DX,BH
- $VIDEO_GETCURSORPOSITION EQU 03H ; Get cursor position and mode
- ; into CX, CX
- $VIDEO_GETLIGHTPENPOSITION EQU 04H ; Get light pen position into
- ; BX,CH,DX
- $VIDEO_SETPAGE EQU 05H ; Select active page from AL
- $VIDEO_SCROLLUP EQU 06H ; Scroll active page up
- $VIDEO_SCROLLDOWN EQU 07H ; Scroll active page down
- $VIDEO_GETATTRCHAR EQU 08H ; Get attribute/character at
- ; current cursor position
- $VIDEO_SETATTRCHAR EQU 09H ; Set attribute/character at
- ; current cursor position
- $VIDEO_SETCHAR EQU 0AH ; Set character at current
- ; cursor position
- $VIDEO_SETCOLOR EQU 0BH ; Set color palette
- $VIDEO_SETDOT EQU 0CH ; Set dot
- $VIDEO_GETDOT EQU 0DH ; Get dot
- $VIDEO_SETTTY EQU 0EH ; Write teletype to active page
- $VIDEO_GETVIDEOSTATE EQU 0FH ; Get current video state
- ; Video function codes for Quadram Quadscreen
- $QS_SWITCHMODE EQU 10H ; Switch modes without erase
- $QS_DESCRIBEMODE EQU 11H ; Get width/height/font info
- $QS_SCREENERASE EQU 12H ; Erase whole screen
- $QS_MOVEDOT EQU 13H ; Move cursor to dot
-
- $HALT EQU 20H ; Program terminate ($DOS with $DOS_HALTKEEP or
- ; $DOS_EXIT are preferred)
-
- $DOS EQU 21H ; Function request
-
- ; Function codes for INT $DOS
-
- $DOS_HALT EQU 00H ; Program terminate
- $DOS_CONIN EQU 01H ; Standard Input to AL (echo to Standard Output)
- $DOS_CONOUT EQU 02H ; Standard Output from DL
- $DOS_AUXIN EQU 03H ; Auxiliary input to AL
- $DOS_AUXOUT EQU 04H ; Auxiliary output from DL
- $DOS_PRTOUT EQU 05H ; Printer output from DL
-
- $DOS_DCONIO EQU 06H ; Direct console I/O (no echo)
- ; Flags for DL
- $DOS_DCONIO_INPUT EQU 0FFH ; Input request
- $DOS_DCONIO_OUTPUT EQU 00H ; Output request
-
- $DOS_DCONIN EQU 07H ; Direct console input (no echo)
- $DOS_CONIN2 EQU 08H ; Standard Input to AL (no echo)
- $DOS_STROUT EQU 09H ; String out to Standard Output
- $DOS_BCONIN EQU 0AH ; Buffered Standard Input
- $DOS_CONSTAT EQU 0BH ; Standard Input status
- $DOS_CONFLUSH EQU 0CH ; Flush Standard Input buffer then invoke
- ; function from code in AL
- $DOS_RESET EQU 0DH ; Disk reset (and flush all file buffers)
- $DOS_SELECT EQU 0EH ; Select drive
- $DOS_OPEN EQU 0FH ; Open file
- $DOS_CLOSE EQU 10H ; Close file
- $DOS_SFIRST EQU 11H ; Search for first entry
- $DOS_SNEXT EQU 12H ; Search for next entry
- $DOS_DELETE EQU 13H ; Delete file
- $DOS_READ EQU 14H ; Sequential Read from file
- $DOS_WRITE EQU 15H ; Sequential Write from file
- $DOS_CREATE EQU 16H ; Create file
- $DOS_RENAME EQU 17H ; Rename file (or file group)
- ; 18H used internally by DOS
- $DOS_CURRENT EQU 19H ; Current disk code to AL
- $DOS_SETDTA EQU 1AH ; Set disk transfer address from DS:DX
- $DOS_GETATI EQU 1BH ; Get allocation table information
- $DOS_GETATI2 EQU 1CH ; Get allocation table information for specific drive
- ; 1DH used internally by DOS
- ; 1EH used internally by DOS
- ; 1FH used internally by DOS
- ; 20H used internally by DOS
- $DOS_RREAD EQU 21H ; Random read
- $DOS_RWRITE EQU 22H ; Random write
- $DOS_FILESIZE EQU 23H ; File size
- $DOS_SETRRF EQU 24H ; Set random record field
- $DOS_SETINT EQU 25H ; Set interrupt vector
- $DOS_CREATEPS EQU 26H ; Create new program segment
- $DOS_RBREAD EQU 27H ; Random block read
- $DOS_RBWRITE EQU 28H ; Random block write
- $DOS_PARSE EQU 29H ; Parse file name
- $DOS_GETDATE EQU 2AH ; Get date in CX:DX
- $DOS_SETDATE EQU 2BH ; Set date from CX:DX
- $DOS_GETTIME EQU 2CH ; Get time in CX:DX
- $DOS_SETTIME EQU 2DH ; Set time from CX:DX
- $DOS_VERIFY EQU 2EH ; Set/Reset verify switch from DL,AL
-
- ; Codes 2F through 57 are new with DOS Version 2.00
-
- $DOS_GETDTA EQU 2FH ; Get current disk transfer address to ES:BX
- $DOS_GETVERSION EQU 30H ; Get DOS version number to AX
- $DOS_HALTKEEP EQU 31H ; Terminate process and keep resident
- ; 32H used internally by DOS
- $DOS_CTLBREAK EQU 33H ; Ctl-Break check from/to AL,DL
- ; 34H used internally by DOS
- $DOS_GETINT EQU 35H ; Get interrupt vector to ES:BX
- $DOS_GETFREE EQU 36H ; Get disk free space
-
- $DOS_SWITCH EQU 37H ; Get/set current command-line switch character
- ; (undocumented, but used internally by DOS)
- ; Control codes in AL for this function:
- $DOS_SWITCH_GET EQU 0 ; Get switch character to DL
- $DOS_SWITCH_SET EQU 1 ; Set switch character from DL
-
- $DOS_COUNTRY EQU 38H ; Return country-dependent information
- $DOS_MKDIR EQU 39H ; Make a subdirectory
- $DOS_RMDIR EQU 3AH ; Remove (delete) a subdirectory
- $DOS_CHDIR EQU 3BH ; Change current directory
- $DOS_CREATE2 EQU 3CH ; Create and open a file returning handle in AX
-
- $DOS_OPEN2 EQU 3DH ; Open a file
- ; Control codes in AL for this function:
- $DOS_OPEN2_READ EQU 0 ; read only
- $DOS_OPEN2_WRITE EQU 1 ; write only
- $DOS_OPEN2_READWRITE EQU 2 ; read/write access
-
- $DOS_CLOSE2 EQU 3EH ; Close a file (handle in BX)
- $DOS_READ2 EQU 3FH ; Read byte stream from file
- $DOS_WRITE2 EQU 40H ; Write byte stream to file
- $DOS_UNLINK EQU 41H ; Delete file (maybe eventually like Unix unlink)
-
- $DOS_LSEEK EQU 42H ; Move file read/write pointer
- ; Control codes in AL for this function
- $DOS_LSEEK_BOF EQU 0 ; offset relative to beginning of file
- $DOS_LSEEK_CURRENT EQU 1 ; offset relative to current position
- $DOS_LSEEK_EOF EQU 2 ; offset relative to end of file
-
- $DOS_CHMOD EQU 43H ; Change file mode
-
- $DOS_IOCTL EQU 44H ; I/O control for devices
- ; Control codes in AL for this function:
- $DOS_IOCTL_GETDEV EQU 00H ; Get device information
- $DOS_IOCTL_SETDEV EQU 01H ; Set device information
- $DOS_IOCTL_READ EQU 02H ; Read bytes
- $DOS_IOCTL_WRITE EQU 03H ; Write bytes
- $DOS_IOCTL_READ2 EQU 04H ; Read bytes from drive in BL
- $DOS_IOCTL_WRITE2 EQU 05H ; Write bytes to drive in BL
- $DOS_IOCTL_GETINPSTAT EQU 06H ; Get input status
- $DOS_IOCTL_GETOUTSTAT EQU 07H ; Get output status
-
- $DOS_DUP EQU 45H ; Duplicate a file handle
- $DOS_FORCEDUP EQU 46H ; Force a duplicate of a handle
- $DOS_GETDIR EQU 47H ; Get current directory
- $DOS_MEMALLOC EQU 48H ; Allocate memory
- $DOS_MEMFREE EQU 49H ; Free memory
- $DOS_MEMMODIFY EQU 4AH ; Modify memory allocation
- $DOS_EXEC EQU 4BH ; Load or execute a program
- $DOS_EXIT EQU 4CH ; Terminate a process with file close and return code
- $DOS_RETURNCODE EQU 4DH ; Get process return code in AX
- $DOS_FINDFIRST EQU 4EH ; Find first matching file
- $DOS_FINDNEXT EQU 4FH ; Find next matching file
- ; 50H used internally by DOS
- ; 51H used internally by DOS
- ; 52H used internally by DOS
- ; 53H used internally by DOS
- $DOS_GETVERIFY EQU 54H ; Get verify state to AL
- ; 55H used internally by DOS
- $DOS_RENAME2 EQU 56 ; Rename a file (even across directories)
- $DOS_FILEDATETIME EQU 57 ; Get/Set file date and time
- ; 58H..FFH undefined at or before DOS 2.0